package cn.com.mds.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.com.mds.common.db.DataSource;
import cn.com.mds.dao.UserDao;
import cn.com.mds.entity.User;
import cn.com.mds.service.UserService;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserDao dao;
	
	public UserServiceImpl()
	{
		System.out.println("初始化UserServiceImpl");
	}
	
	
	public boolean save(User u) {
		return dao.insert(u);
	}

	
	public List<User> getList() {
		String hql = "from User";
		return dao.getList(hql);
	}

}
